import request from '@/utils/request'

export function create(data) {
  return request({
    url: 'api/core/group/create',
    method: 'post',
    data
  })
}

export function invite(data) {
  return request({
    url: 'api/core/group/invite',
    method: 'post',
    data
  })
}

export function dissolution(data) {
  return request({
    url: 'api/core/group/dissolution/' + data.groupId,
    method: 'post'
  })
}

export function detail(data) {
  return request({
    url: 'api/core/group/detail',
    method: 'get',
    data
  })
}

export function info(data) {
  return request({
    url: 'api/core/group/info',
    method: 'get',
    data
  })
}

export function list() {
  return request({
    url: 'api/core/group/list',
    method: 'get'
  })
}

export function findGroupBelonging(userId) {
  return request({
    url: 'api/core/group/findGroupBelonging/' + userId,
    method: 'get'
  })
}

